package com.gnerv.business.platform.entity;

import com.alibaba.fastjson.JSON;
import com.baomidou.mybatisplus.activerecord.Model;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.annotations.TableName;

import java.io.Serializable;
import java.util.List;

/**
 * @description:
 * @author: Gnerv LiGen
 * @date: 2018-07-10
 **/
@TableName(value = "platform_dict")
public class Dict extends Model<Dict> implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 主键
     */
    private Long id;

    private String dictId;

    private String dictCode;

    private String dictName;

    private String dictType;
    @TableField(exist = false)
    private List<DictValue> dictValue;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getDictId() {
        return dictId;
    }

    public void setDictId(String dictId) {
        this.dictId = dictId;
    }

    public String getDictCode() {
        return dictCode;
    }

    public void setDictCode(String dictCode) {
        this.dictCode = dictCode;
    }

    public String getDictName() {
        return dictName;
    }

    public void setDictName(String dictName) {
        this.dictName = dictName;
    }

    public String getDictType() {
        return dictType;
    }

    public void setDictType(String dictType) {
        this.dictType = dictType;
    }

    public List<DictValue> getDictValue() {
        return dictValue;
    }

    public void setDictValue(List<DictValue> dictValue) {
        this.dictValue = dictValue;
    }

    @Override
    public String toString() {
        return JSON.toJSONString(this);
    }

    @Override
    protected Serializable pkVal() {
        return this.id;
    }
}
